import 'package:dio/dio.dart';
import 'bean/datedetails.dart';
import 'config/api.dart';
import 'bean/dateinfo.dart';

Future getDateInfo(var jsondata) async {
  try {
    Dio dio = Dio();
    Response res = await dio.get(Api.GET_DATE_INFO, queryParameters: jsondata);
    DateInfo dateInfo = DateInfo.fromJson(res.data);
    return dateInfo;
  } catch (e) {
    return print(e);
  }
}

Future getDateInfodetails(var jsondata) async {
  try {
    Dio dio = Dio();
    Response res =
        await dio.get(Api.GET_DATE_DETAILS, queryParameters: jsondata);
    Datedetails datedetails = Datedetails.fromJson(res.data);
    return datedetails;
  } catch (e) {
    return print(e);
  }
}
